package com.cndatacom.ccsinfoMgr.service.impl;

import com.cndatacom.ccsinfoMgr.dao.IDownloadInfoDao;
import com.cndatacom.ccsinfoMgr.model.DownloadInfo;
import com.cndatacom.ccsinfoMgr.service.IDownloadInfoService;
import com.cndatacom.eweb.common.PaginationModel;

public class DownloadInfoService implements IDownloadInfoService {

	private IDownloadInfoDao downloadInfoDao;
	
	public boolean deleteDownloadInfo(DownloadInfo downloadInfo) {
		return downloadInfoDao.deleteDownloadInfo(downloadInfo);
	}

	public PaginationModel getAllDownloadInfo(int offset, int pageSize) {
		return downloadInfoDao.getAllDownloadInfo(offset, pageSize);
	}

	public PaginationModel getDownloadInfoByHQL(String hql, int offset, int pageSize) {
		return downloadInfoDao.getDownloadInfoByHQL(hql, offset, pageSize);
	}

	public DownloadInfo getDownloadInfoById(int id) {
		return downloadInfoDao.getDownloadInfoById(id);
	}

	public DownloadInfo saveOrUpdateDownloadInfo(DownloadInfo downloadInfo) {
		return downloadInfoDao.saveOrUpdateDownloadInfo(downloadInfo);
	}
	
	public IDownloadInfoDao getDownloadInfoDao() {
		return downloadInfoDao;
	}
	public void setDownloadInfoDao(IDownloadInfoDao downloadInfoDao) {
		this.downloadInfoDao = downloadInfoDao;
	}

}

